package cn.jiguang.demo.baselibrary;

import android.app.Application;

import cn.jiguang.api.utils.JCollectionAuth;
import cn.jpush.android.api.JPushInterface;

/**
 * Copyright(c) 2020 极光
 * Description
 */
public class BaseApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        if (SPUtils.isShowPrivacy(this)){
            initJPush();
        } else {
            JCollectionAuth.setAuth(this, false);
        }
    }

    private void initJPush() {
        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);
    }
}
